package gui.lesson03;

import java.awt.*;

public class TestPaint {
    public static void main(String[] args) {
        MyPaint myPaint = new MyPaint();
        myPaint.initview();
    }
}
class MyPaint extends Frame{
    public void initview(){
        setBounds(200,200,600,400);
        setVisible(true);
    }
    @Override
    public void paint(Graphics g) {
        //画笔要操作的事件
        g.setColor(Color.black);
        //虚心
        g.drawOval(100,100,100,100);
        //实心
        g.setColor(Color.green);
        g.fillOval(200,100,100,100);
        g.setColor(Color.blue);
        g.fillRect(300,100,100,100);
    }
}